@extends('page')
@section('content')
    <style type="text/css">
        .nav-bar{
            display: none;
        }
    </style>
    <div class="layui-row">
        <form class="layui-form ">
            @include("widget.dateRange")
            <div class="layui-input-inline">
                <input class="layui-input" placeholder="文件名" name="keyword">
            </div>
            <div class="layui-input-inline">
                <button class="layui-btn" lay-submit="" lay-filter="search">
                    <i class="iconfont icon-ic_search"></i>
                </button>
            </div>
        </form>
    </div>
    <table class="layui-hide" id="listTable"></table>
@stop
@push('js')
    <script type="text/javascript">
        var listTableInc = new ListTable("{{url()->current()}}");
        listTableInc.lineNumber();
        listTableInc.column("ID", "id");
        listTableInc.column("文件名", "file_name");
        listTableInc.column("上传人", "name");
        listTableInc.column("总数据", "total");
        listTableInc.column("成功数", "success");
        listTableInc.column("失败数量", "error");
        listTableInc.column("导入时间", "import_time").dateTime();
        listTableInc.rowBarWidth = 250;
        listTableInc.actionBar('下载错误数据', function (tb,d) {
            location.href = "{{url($baseRoute.'down/2')}}/" + d.id;
        },'d.error > 0');
        listTableInc.actionBar('下载导入数据', function (tb,d) {
            location.href = "{{url($baseRoute.'down/1')}}/" + d.id;
        });
        listTableInc.render();
    </script>
@endpush
